﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Entities;
using System.Security.Permissions;
namespace WCF_ListenMusic.Services.Module_Song.Admin
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IManageSongService" in both code and config file together.
    [ServiceContract]
    public interface IManageSongService
    {
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        List<SongSinger> manageActiveSong(int typeid);

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        bool activeSong(int songid);

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        List<SongSinger> getAllSongSinger(int typeid);

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        List<SongSinger> getSongSinger_bySongName(string songName, int typeid);

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        bool insertNewSong(Song song);

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        int getMax_SongID();

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        bool deleteSong_bySongID(int songid);

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        bool updateSong(Song s);

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        SongSinger getSongSinger_bySongID(int songid);

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        List<SongAlbum> getSongAlbum_byAlbumID(int albumid);
    }
}
